/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package me.oz.test.api;

import io.reactivex.Observable;
import java.util.Map;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Url;

/**
 *
 * @author oz
 */
public interface IUploadService {

    @Multipart
    @POST
    Observable<ResponseBody> uploadFileWithPartMap(
            @Url String url,
            @PartMap Map<String, RequestBody> partMap,
            @Part("file") MultipartBody.Part file);

    @POST("http://47.93.193.64/upload")
    Observable<ResponseBody> upload(@Body RequestBody body);

    @POST
    Observable<ResponseBody> upload(
            @Url String url,
            @Body RequestBody body);
    
}
